<?php

namespace  Yeevers\Api\Util;

class AesUtils
{

    private static $iv = "yeeverse-cbc-key";


    public static function encrypt($input, $key){
        return Base64Utils::base64UrlEncode(openssl_encrypt($input, 'AES-256-CBC', $key, OPENSSL_RAW_DATA,AesUtils::$iv));
    }

    public static function decrypt($input, $key){
        return openssl_decrypt(Base64Utils::base64UrlDecode($input), 'AES-256-CBC', $key, OPENSSL_RAW_DATA, AesUtils::$iv);
    }

}